<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<audio id="audio" src="music/Kalimba.mp3"></audio>
		<input type="button" id="btn" value="播放" />
	</body>
	<script type="text/javascript">
		var btn = document.querySelector("#btn");
		var audio = document.querySelector("#audio");
		
		btn.addEventListener("click", function() {
			//判断是否暂停
			if (audio.paused) {
				audio.play();
			} else {
				audio.pause();
			}
		});
	</script>

</html>